home *** CD-ROM | disk | FTP | other *** search
-
- Peeks, Pokes, and Syses, PART 20
-
- by Jimmy Weiler
-
-
- ======================================
-
- Location: 203 Hexadecimal:$00CB
- Official Label: SFDX Type:RAM
- Useful BASIC commands: PEEK
-
- --------------------------------------
-
- SFDX is a lot like LSTX. (You remember
-
- LSTX -- we covered that in part 10.)
-
- You can peek SFDX to find out what key
-
- is being held down. There is no
-
- obvious relationship between a key and
-
- the number you will find in SFDX when
-
- you press that key. That's what this
-
- chart is for:
-
- --------------------------------------
- SFDX key value chart
- --------------------------------------
-
- 0 = inst/del 33 = i
- 1 = return 34 = j
- 2 = _crsr 35 = 0
- 3 = f7/f8 36 = m
- 4 = f1/f2 37 = k
- 5 = f3/f4 38 = o
- 6 = f5/f6 39 = n
- 7 = ^crsr 40 = +
- 8 = 3 41 = p
- 9 = w 42 = l
- 10 = a 43 = -
- 11 = 4 44 = .
- 12 = z 45 = :
- 13 = s 46 = @
- 14 = e 47 = ,
- 15 = not used 48 = \
- 16 = 5 49 = *
- 17 = r 50 = ;
- 18 = d 51 = clr/home
- 19 = 6 52 = not used
- 20 = c 53 = <equals sign>
- 21 = f 54 = ^
- 22 = t 55 = /
- 23 = x 56 = 1
- 24 = 7 57 = _
- 25 = y 58 = not used
- 26 = g 59 = 2
- 27 = 8 60 = space
- 28 = b 61 = not used
- 29 = h 62 = q
- 30 = u 63 = run/stop
- 31 = v 64 = no key pressed
- 32 = 9
-
-
-
- ======================================
-
-
- Location: 204 Hexadecimal: 00CC
- Official label: BLNSW Type: RAM
- Useful BASIC commands: POKE
-
- --------------------------------------
-
- BLNSW is the Blink Switch. If its
-
- value is one, a GET statement will not
-
- display a cursor. That is the normal
-
- state for a Commodore 64. If you poke
-
- BLNSW to zero immediately before a
-
- GET statement, then a cursor will
-
- blink as you process the GET.
-
- Here's how:
-
-
- 100 poke204,0:getk$:ifk$=""then100
-
-
- Pretty dull stuff. Let's do something
-
- interesting with it. Let's see ....
-
- something that uses a GET statement
-
- with a displayed cursor and checks to
-
- see which keys are being pressed...
-
- Sounds like an input routine to me.
-
- So here's the plan -- We'll write
-
- a subroutine to get a line of input
-
- from the keyboard. There will be a
-
- blinking cursor on screen where the
-
- letters you type will appear. All
-
- text and graphics characters will be
-
- accepted as input, but all function
-
- keys, inst, del, clr, home, and the
-
- up, down and right crsr movement will
-
- be disabled. CRSR LEFT will backspace
-
- and erase the letters it spaces over.
-
- When you press return, the line you
-
- have typed will be assigned to a
-
- string. If you type a quote you will
-
- not enter 'quote mode'.
-
- Sounds sorta challenging. Let's
-
- see if we can fit it all into less
-
- than 20 BASIC statements.
-
- --------<continued in part 21>--------
-